#include<stdio.h>

void swap(int* x, int* y) {
    int tmp = *x;
    *x = *y;
    *y = tmp;
    return;
}
int main() {
    int matrix[4][4] = { 0 };
    //输入
    for (int col = 0; col < 4; col++)
        for (int row = 0; row < 4; row++)
            scanf("%d", &matrix[col][row]);
    //交换
    for (int row = 0; row < 4; row++)
        swap(&matrix[0][row], &matrix[2][row]);
    //输出
    for (int col = 0; col < 4; col++) {
        for (int row = 0; row < 4; row++) {
            printf("%5d", matrix[col][row]);
        }
        printf("\n");
    }
    return 0;


